home *** CD-ROM | disk | FTP | other *** search
- Path: antoniades.lcs.mit.edu!frankkim
- From: frankkim@antoniades.lcs.mit.edu (Frank Kim)
- Newsgroups: comp.lang.c++
- Subject: C++ questions - please help
- Date: 21 Mar 1996 14:28:52 GMT
- Organization: MIT Laboratory for Computer Science, Cambridge MA
- Message-ID: <4irp34$b6q@GRAPEVINE.LCS.MIT.EDU>
- NNTP-Posting-Host: antoniades.lcs.mit.edu
-
-
- Hi,
-
- I was looking through some code and some of the stuff just stumped me.
-
- Question #1:
-
- There is a class defined like this...
-
- class faxRmApp : public FaxClient {
- private:
- fxStr appName; // for error messages
- fxStrArray jobids;
- fxStr request;
-
- void usage();
- void printError(const char* fmt, ...);
- void printWarning(const char* fmt, ...);
- public:
- faxRmApp();
- ~faxRmApp();
-
- void initialize(int argc, char** argv);
- void open();
-
- void recvConf(const char* cmd, const char* tag);
- void recvEof();
- void recvError(const int err);
- };
-
- and its constructor looks like this:
-
- faxRmApp::faxRmApp() : request("remove") {}
-
- I don't understand why the request("remove") initialization is outside
- the brackets.
-
- The next questions are even dumber. :)
-
- Question #2
-
- Why does the scope of the external declaration not extend beyond the
- inner block?
-
- {
- {
- extern E;
- E = 0;
- }
- E = 1;
- }
-
-
-
- Question #3
-
- Is there any difference between these two declarations?
-
- char *s1 = "hello";
- char s2[] = "hello";
-
-
- Any help would be most appreciated!
-
- --
- Frank Kim frankkim@catfish.lcs.mit.edu
- http://cag-www.lcs.mit.edu/~frankkim/
-
-